package com.patrol.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.patrol.pojo.Worker;
import com.patrol.utils.Msg;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

public interface WorkerService {
    /**
     * 增删改
     *
     * @return ：成功或失败信息
     */
    boolean insert(Worker worker);

    boolean delete(int workerId);

    boolean update(Worker worker);

    /**
     * 通过workId查询全部信息
     *
     * @return ：Msg 里add(信息，Worker类)
     */
    Worker select(int id);

    Page<Worker> selectPage(long currentPage, long limit);

    void exportDataByDate(HttpServletResponse response, String startTime, String endTime) throws IOException;
}
